<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>跟我走</title>
		<link rel="stylesheet" type="text/css" href="HNUST/../../reception/css/style.css">
		<link rel="stylesheet" type="text/css" href="HNUST/../../reception/css/mdd.css">
		<script type="text/javascript" src="HNUST/../../reception/js/Adaptive.js"></script>
	    <meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="HNUST/../../reception/css/mui.min.css">
		<script src="HNUST/../../reception/js/jquery.js"></script>
		 <script src="HNUST/../../user/js/pintuer.js"></script>  
    <script src="HNUST/../../user/js/jquery.validate.js"></script>
		<script type="text/javascript">
		$("#send").click(function(){
		        	var strategy = $("#strategy").val();	
		    		
		    			$.ajax({
		    				url:"/HNUST/strategy/xqStrategy",
		    				type:"POST",
		    				data:{"strategy" : strategy},
		    				dataType:"json",
		    				
		    				success:function(data){
		    					if(data.userName == "登录了"){
		    						window.location.href="mddxym";
		    					}else if(data.asg == "1"){
		    						alert("请先登录！");
		    						window.location.href="login";
		    					}
		    					
		    				},
		    				error:function(data){
		    					
		    					location.reload(true);
		    				}
		    		}
		</script>
	</head>

	<body>
		
		<header id="header" class="mui-bar mui-bar-nav">
		
			<h1 class="mui-title">目的地攻略</h1>
		</header>
		
		<div class="mui-content">
			<div class="head-dd">
			<c:forEach items="${strategy }" var="item">
			
			<a id="send">
			<input type="hidden" value="${item.strategy_id}" id="strategy">
			<div class="TBwz">
				<div class="TB-titel">
					<img src="${item.strategy_tp} " />
					<div class="TB-WZ">

						<p class="TB-WZ-SZ">
							<a href="mddcym.html">【${item.strategy_name}】</a>
						</p>
						<p>
							<a href="#"></a>
						</p>
					</div>
					<div class="TB-jxyd">
						<p>${item.strategy_name}<span>456阅读</span></p>
					</div>
				</div>
			</div>
			
			</a>
			</c:forEach>
		<footer>
		 <a href="qtindex">
		<div class="foot act">
			<img src="HNUST/../../reception/images/foot/ft_1_1.png">
			<p>推荐</p>
		</div>
	</a> <a href="StrategyList">
		<div class="foot">
			<img src="HNUST/../../reception/images/foot/ft_2.png">
			<p>目的地</p>
		</div>
	</a>
<a href="card">
	<div class="foot">
		<img src="HNUST/../../reception/images/foot/ft_3.png">
		<p>帖子</p>
	</div>
</a>
	<a href="person">
		<div class="foot">
			<img src="HNUST/../../reception/images/foot/ft_4.png">
			<p>我的</p>
		</div>
	</a> </footer>
		</div>
		<script src="HNUST/../../reception/js/mui.js"></script>
		<script type="text/javascript">
			mui.init({
				swipeBack:true //启用右滑关闭功能
			});
			 //右侧文字按钮
			var rightbtn = document.createElement('button');
			rightbtn.className = 'mui-btn mui-btn-blue mui-btn-link mui-pull-right';
			rightbtn.innerText = '编辑';
			 //删除原先存在的节点
			function remove(selector) {
				var elem = header.querySelector(selector);
				if (elem) {
					header.removeChild(elem);
				}
			}
			mui('.mui-input-group').on('change', 'input', function() {
				if (this.checked) {
					switch (this.value) {
						case 'left-none':
							remove('.mui-pull-left')
							break;
						case 'left-icon':
							remove('.mui-pull-left');
							header.appendChild(lefticon);
							break;
						case 'left-btn':
							remove('.mui-pull-left');
							header.appendChild(leftbtn);
							break;
						case 'right-none':
							remove('.mui-pull-right');
							break;
						case 'right-icon':
							remove('.mui-pull-right')
							header.appendChild(righticon);
							break;
						case 'right-btn':
							remove('.mui-pull-right');
							header.appendChild(rightbtn);
							break;
					}
				}
			});
		</script>
	</body>

</html>